home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769A.ZIP
/
ISMMDEMO.PRG
< prev
next >
Wrap
Text File
|
1987-08-29
|
1KB
|
65 lines
SET TALK OFF
NOMEMOFILE = '!'
BAD_OPEN = '$'
READ_ERROR = '@'
RANGE_ERROR = '%'
NO_POINTER = '0'
POINTER = '1'
CLEAR
TEXT
Demo program for ISMEMO.BIN (OBJ) -- v. 0.1 Beta
This program will scan all records of a database and report which have memo
fields attached. Press escape to abort, or any other key to continue...
ENDT
WAIT ''
dbfname=space(80)
@20,0 SAY "DBF name to scan:" GET dbfname
READ
dbfname=TRIM(dbfname)
m=0
ON ERROR m=ERROR()
USE &dbfname
ON ERROR
IF m <> 0
??CHR(7)
@22,0 SAY "DBF not found!!"
RETU
ENDIF
LOAD ISMEMO
mdbf=DBF()
m=mdbf+"/"+STR(RECNO())
CALL ISMEMO WITH m
IF LEFT(m,1)=NOMEMOFILE
??CHR(7)
@22,0 SAY "No memo file!!"
RETU
ENDI
IF LEFT(m,1)=BAD_OPEN
??CHR(7)
@22,0 SAY "Cannot open file!! Is this a network situation?"
RETU
ENDI
memo_count=0
DO WHILE .NOT. EOF() .AND. RECNO() < 65000
@22,0 SAY "Scanning record "+LTRI(STR(RECNO()))
IF left(m,1)='1'
@23,0 SAY "Record number "+LTRI(STR(RECNO()))+": memo found"
memo_count=memo_count+1
ENDI
SKIP 1
m=mdbf+"/"+STR(RECNO())
CALL ISMEMO WITH m
ENDDO
@23,0
@23,0 SAY "Memo records total: "+LTRI(STR(memo_count))
WAIT ''
USE
RETU